State Board Matching Logic
The stored procedure spAANPGetPersonDupeRecords__c in the Aptify Database is used to find duplicate records based on various matching criteria such as name, address, email, and license details.
Steps
-
Initialize Variables:
- Set up temporary storage for results.
- Prepare input parameters by trimming whitespace and ensuring they are not null.
-
Matching Process:
| MatchType | Logic Description |
|---|---|
| Awesomely Perfect | Match by First Name, Last Name, and any Email address on file. If all fields match with a person’s record, it’s considered a perfect match. |
| Awesomely Perfect | If no match found by email, then match by First Name, Last Name (or known aliases), License Number, and License State. If all fields match, it’s considered a perfect match. |
| Perfect Match | If no awesomely perfect match is found, then match by First Name, Last Name (or known aliases), Street Address, City, and State against the person’s home, business, billing, or PO Box address. If all fields match, it’s a perfect match. |
| Almost Perfect Match | If no perfect match is found, then match by First Name (or known aliases), Street Address, City, and State against the person’s home, business, billing, or PO Box address. |
| Almost Perfect Too | If no almost perfect match is found, then match by First Name (or known aliases), License Number, and License State. If all fields match, it’s almost perfect too. |
| Very Close Match | If no almost perfect too match is found, then match by First Name, Last Name (or known aliases), and State against the person’s home, business, billing, or PO Box address. If all fields match, it’s a very close match. |
| Close Match | If no very close match is found, then match by First Name (or known aliases), City, and State against the person’s home, business, billing, or PO Box address. If all fields match, it’s a close match. |
| Similar Match | If no close match is found, then match by First Name (or known aliases) and Last Name (or known aliases). If both fields match, it’s a similar match. |
| No Match | If no match is found, the record is flagged as unmatched. The record will be imported into the NP Demographics database as a new person. |
-
Output:
- The procedure outputs all the found matches along with their match types.
-
Clean Up:
- Drops the temporary storage to clean up.